package com.cn.test;

import com.cn.config.SpringConfig;
import com.cn.pojo.Car;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试纯注解开发模式
 */
public class AnnotationTest2 {
    @Test
    public void  test1(){
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        Car car1 = context.getBean("car1", Car.class);
        System.out.println(car1.getCarName());
    }

}
